{% for brick in bricks %}
volume {{ volname }}-client-{{ brick["brick_index"] }}
    type protocol/client
    option remote-subvolume {{ brick["brick_path"] }}
    option remote-host {{ brick["node"] }}
end-volume

{% endfor %}

volume {{ volname }}-dht
    type cluster/distribute
    subvolumes {{ dht_subvol|join(' ') }}
{% if decommissioned != "" %}
    option decommissioned-bricks {{ decommissioned }}
{% endif %}
end-volume

volume {{ volname }}-utime
    type features/utime
    option noatime on
    subvolumes {{ volname }}-dht
end-volume

volume {{ volname }}-md-cache
    type performance/md-cache
    subvolumes {{ volname }}-utime
end-volume

volume {{ volname }}-write-behind
    type performance/write-behind
    option cache-size 1MB
    option flush-behind on
    option write-behind on
    subvolumes {{ volname }}-md-cache
end-volume

volume {{ volname }}-open-behind
    type performance/open-behind
    option use-anonymous-fd no
    option open-behind on
    option pass-through false
    option read-after-open yes
    option lazy-open yes
    subvolumes {{ volname }}-write-behind
end-volume

volume {{ volname }}-nl-cache
    type performance/nl-cache
    option pass-through false
    option nl-cache on
    subvolumes {{ volname }}-open-behind
end-volume

volume {{ volname }}
    type debug/io-stats
    option unique-id /no/such/path
    subvolumes {{ volname }}-nl-cache
end-volume

